<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="#">活动订单管理</a></li>
		</ul>
        <form class="well form-search" method="post" action="{:U('Order/activity')}">
            商户名:
            <input type="text" name="name" style="width: 100px;" value="{:I('request.name/s','')}" placeholder="请输入商户名">
            用户电话:
            <input type="text" name="phone" style="width: 100px;" value="{:I('request.phone/s','')}" placeholder="请输入用户电话">
			订单号:
            <input type="text" name="sn" style="width: 100px;" value="{:I('request.sn/s','')}" placeholder="请输入订单号">
            订单状态:
            <php>$status=I('status');</php>
            <select name="status" style="width: 100px;" >
                <option value="99">全部</option>
                <option value="0" <php>if($status==="0"){echo 'selected';}</php> >未支付</option>
                <option value="1" <php>if($status==1){echo 'selected';}</php> >已支付</option>
                <option value="2" <php>if($status==2){echo 'selected';}</php> >已完成</option>
            </select>
            <br/>
            <br/>
            创建时间:
            <input type="text" name="start_time" class="js-datetime" value='{$start_time|date="Y-m-d H:i",###}'
                   style="width: 120px;" autocomplete="off">-
            <input type="text" class="js-datetime" name="end_time" value='{$end_time|date="Y-m-d H:i",###}'
                   style="width: 120px;" autocomplete="off"> &nbsp; &nbsp;
            <input type="submit" class="btn btn-primary" value="搜索" id="sou"/>
            <a class="btn btn-danger" href="{:U('Order/activity')}">清空</a>
        </form>
        <div>全部已支付订单总金额：{$total}</div>
        <br/>
		<php>$order_status=array("0"=>'未支付',"1"=>'已支付',"2"=>'已完成');</php>
		<php>$payment=array("1"=>'微信',"2"=>'支付宝',"3"=>'线下支付');</php>
		<form method="post" class="js-ajax-form">
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th width="50">ID</th>
						<th>订单号</th>
						<th>商户名</th>
						<th>服务名</th>
						<th>价格</th>
						<th>用户名</th>
						<th>用户电话</th>
						<th>支付方式</th>
						<th>创建时间</th>
						<th width="45">{:L('STATUS')}</th>
<!--						<th width="120">{:L('ACTIONS')}</th>-->
					</tr>
				</thead>
				<tbody>
					<foreach name="orders" item="vo">
					<tr>
						<td>{$vo.id}</td>
						<td>{$vo.sn}</td>
						<td>{$vo.name}</td>
						<td>{$vo.business_activity_name}</td>
						<td>{$vo.total}</td>
						<td>{$vo.username}</td>
						<td>{$vo.phone}</td>
						<td><php>if($vo['status']!=0){echo $payment[$vo['payment']];}</php></td>
                        <td>{$vo.create_time|date="Y-m-d",###}</td>
						<td>{$order_status[$vo['status']]}</td>
<!--						<td>
                            <a href="{:U('Order/getDetails',array('id'=>$vo['id']))}">查看详情</a>
						</td>-->
					</tr>
					</foreach>
				</tbody>
			</table>
		</form>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>